<%@ page import="mybatis.services.StudentServerices" %>
<%@ page import="mybatis.pojo.Student" %>
<%@ page import="java.util.Date" %><%--
  Created by IntelliJ IDEA.
  User: Dell
  Date: 2022/7/1
  Time: 15:45
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>反馈</title>

</head>
<body>
<%

    request.setCharacterEncoding("utf-8");
    String sname = request.getParameter("sname");
    String gender = request.getParameter("gender");
    String tel = request.getParameter("tel");
    String qq = request.getParameter("qq");
    String wechat = request.getParameter("wechat");
    int gradeId = Integer.parseInt(request.getParameter("gradeId"));
    java.sql.Date enterDate = java.sql.Date.valueOf(request.getParameter("enterDate"));

    String city = request.getParameter("city");
    java.sql.Date birth = java.sql.Date.valueOf(request.getParameter("birth"));
    String address = request.getParameter("address");
    String psd = request.getParameter("psd");
    String idCard = request.getParameter("idCard");
    int add = StudentServerices.ME.add(new Student(sname, gender, tel, qq, wechat, gradeId, enterDate, city, birth, address, psd, idCard));
    if (add > 0) {
        out.print("新增学生成功");
    }


%>
<p>
    姓名： <%=sname
%>
    性别： <%=gender
%>
    电话： <%=gradeId
%>
    qq： <%=qq
%>
    微信： <%=wechat
%>
    年级： <%=gradeId
%>
    入学时间： <%=enterDate
%>
    来自城市： <%=city
%>
    出生日期： <%=birth
%>
    家庭住址： <%=address
%>
</p>
</body>
</html>
